<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title> Loading from xml string</title>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="title" content="Samples" />
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
		<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />

	</head>
	<body>
        <div class="header">
            <a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
            <div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
            <div class="search-field">
                <input type="text" title="Search"/>
                <input class="button" type="submit" value=""/>
            </div>
            <div class="buttons">
                <a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
                <a class="sample"></a>
            </div>
        </div>
        <div class="content">
            <div class="navigation-div">
                <a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
                <div class="arrow"></div>
                <a href="../index.html" class="navigation"><img height="22" src="../common/icons/tree.gif" alt="" >dhtmlxTree</a>
                <div class="arrow"></div>
                <a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Loading/Processing data</a>
            </div>
            <div style="display:block;">
                <h3> Loading from xml string</h3>
            </div>
            <div class="navigation-div">
                <a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
            </div>
            <p>dhtmlxTree supports loading tree structure from an xml string.</p>
	<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxtree.css">
	
	<script  src="../../codebase/dhtmlxcommon.js"></script>
	<script  src="../../codebase/dhtmlxtree.js"></script>

	
				<div id="treeboxbox_tree" style="width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div>
	
	<script>


			tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);



			tree.setSkin('dhx_skyblue');
			tree.setImagePath("../../codebase/imgs/csh_bluebooks/");
			tree.enableSmartXMLParsing(true);
			tree.enableCheckBoxes(true);
            tree.enableDragAndDrop(true);
			tree.enableThreeStateCheckboxes(true);

            var xml='<?xml version="1.0" encoding="iso-8859-1" ?><tree id="0"><item text="Briari\'s" id="1"></item></tree>';
			tree.loadXMLString('<?xml version="1.0" encoding="iso-8859-1"?><tree id="0"><item text="Lawrence Block" id="t2_lb" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif"><item text="All the Flowers Are Dying" id="lb_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="The Burglar on the Prowl" id="lb_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="The Plot Thickens" id="lb_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="Grifter Game" id="lb_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="The Burglar Who Thought He Was Bogart" id="lb_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/></item><item text="Robert Crais" id="t2_rc" open="1" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif"><item text="The Forgotten Man" id="rc_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="Stalking the Angel" id="rc_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="Free Fall" id="rc_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/>       <item text="Sunset Express" id="rc_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/> <item text="Hostage" id="rc_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/></item><item text="Dan Brown" id="t2_db" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif">                    <item text="Angels &amp; Demons" id="db_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="Deception Point" id="db_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="Digital Fortress" id="db_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="The Da Vinci Code" id="db_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="Deception Point" id="db_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/></item><item  text="Joss Whedon" id="t2_jw" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif"><item text="Astonishing X-Men" id="jw_1" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="Joss Whedon: The Genius Behind Buffy" id="jw_2" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="Fray" id="jw_3" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="Tales Of The Vampires" id="jw_4" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/><item text="The Harvest" id="jw_5" im0="book_titel.gif" im1="book_titel.gif" im2="book_titel.gif"/></item></tree>');


			






	</script>
<br><br>
			
			
         </div>
    <div class="source">
        <div class="teg">Source</div>
        <div class="code" id="code">
		<div class="hl-main"><pre><span class="hl-code"> 
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">link</span><span class="hl-code"> </span><span class="hl-var">rel</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">STYLESHEET</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">type</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">text/css</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">href</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxtree.css</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code">  </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-code">  </span><span class="hl-var">src</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/dhtmlxtree.js</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
 
            </span><span class="hl-brackets">&lt;</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">id</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">treeboxbox_tree</span><span class="hl-quotes">&quot;</span><span class="hl-code"> </span><span class="hl-var">style</span><span class="hl-code">=</span><span class="hl-quotes">&quot;</span><span class="hl-string">width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">div</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code"><div class="hl-main"><pre><span class="hl-identifier">tree</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXTreeObject</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">treeboxbox_tree</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">100%</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-quotes">&quot;</span><span class="hl-string">100%</span><span class="hl-quotes">&quot;</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code">;
 
</span><span class="hl-identifier">tree</span><span class="hl-code">.</span><span class="hl-identifier">setSkin</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">dhx_skyblue</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">tree</span><span class="hl-code">.</span><span class="hl-identifier">setImagePath</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">../../codebase/imgs/csh_bluebooks/</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">tree</span><span class="hl-code">.</span><span class="hl-identifier">enableSmartXMLParsing</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">tree</span><span class="hl-code">.</span><span class="hl-identifier">enableCheckBoxes</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">tree</span><span class="hl-code">.</span><span class="hl-identifier">enableDragAndDrop</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">tree</span><span class="hl-code">.</span><span class="hl-identifier">enableThreeStateCheckboxes</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">xml</span><span class="hl-code"> = </span><span class="hl-quotes">'</span><span class="hl-string">&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot; ?&gt;&lt;tree id=&quot;0&quot;&gt;&lt;item text=&quot;Briari</span><span class="hl-special">\'</span><span class="hl-string">s&quot; id=&quot;1&quot;&gt;&lt;/item&gt;&lt;/tree&gt;</span><span class="hl-quotes">'</span><span class="hl-code">;
</span><span class="hl-identifier">tree</span><span class="hl-code">.</span><span class="hl-identifier">loadXMLString</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string">&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;&lt;tree id=&quot;0&quot;&gt;&lt;item text=&quot;Lawrence Block&quot; id=&quot;t2_lb&quot; im0=&quot;folderClosed.gif&quot; im1=&quot;folderOpen.gif&quot; im2=&quot;folderClosed.gif&quot;&gt;&lt;item text=&quot;All the Flowers Are Dying&quot; id=&quot;lb_1&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;The Burglar on the Prowl&quot; id=&quot;lb_2&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;The Plot Thickens&quot; id=&quot;lb_3&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;Grifter Game&quot; id=&quot;lb_4&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;The Burglar Who Thought He Was Bogart&quot; id=&quot;lb_5&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;/item&gt;&lt;item text=&quot;Robert Crais&quot; id=&quot;t2_rc&quot; open=&quot;1&quot; im0=&quot;folderClosed.gif&quot; im1=&quot;folderOpen.gif&quot; im2=&quot;folderClosed.gif&quot;&gt;&lt;item text=&quot;The Forgotten Man&quot; id=&quot;rc_1&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;Stalking the Angel&quot; id=&quot;rc_2&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;Free Fall&quot; id=&quot;rc_3&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;       &lt;item text=&quot;Sunset Express&quot; id=&quot;rc_4&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt; &lt;item text=&quot;Hostage&quot; id=&quot;rc_5&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;/item&gt;&lt;item text=&quot;Dan Brown&quot; id=&quot;t2_db&quot; im0=&quot;folderClosed.gif&quot; im1=&quot;folderOpen.gif&quot; im2=&quot;folderClosed.gif&quot;&gt;                    &lt;item text=&quot;Angels &amp;amp; Demons&quot; id=&quot;db_1&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;Deception Point&quot; id=&quot;db_2&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;Digital Fortress&quot; id=&quot;db_3&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;The Da Vinci Code&quot; id=&quot;db_4&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;Deception Point&quot; id=&quot;db_5&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;/item&gt;&lt;item  text=&quot;Joss Whedon&quot; id=&quot;t2_jw&quot; im0=&quot;folderClosed.gif&quot; im1=&quot;folderOpen.gif&quot; im2=&quot;folderClosed.gif&quot;&gt;&lt;item text=&quot;Astonishing X-Men&quot; id=&quot;jw_1&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;Joss Whedon: The Genius Behind Buffy&quot; id=&quot;jw_2&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;Fray&quot; id=&quot;jw_3&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;Tales Of The Vampires&quot; id=&quot;jw_4&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;item text=&quot;The Harvest&quot; id=&quot;jw_5&quot; im0=&quot;book_titel.gif&quot; im1=&quot;book_titel.gif&quot; im2=&quot;book_titel.gif&quot;/&gt;&lt;/item&gt;&lt;/tree&gt;</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;</span></pre></div></span><span class="hl-brackets">&lt;/</span><span class="hl-reserved">script</span><span class="hl-brackets">&gt;</span><span class="hl-code">
</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span><span class="hl-brackets">&lt;</span><span class="hl-reserved">br</span><span class="hl-brackets">&gt;</span></pre></div>
        </div>
    <div class="footer">
        <div class="footer-logo"></div>
        <div class="copyright">Copyright &copy; 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
    </div>
	</body>
</html>